package com.etl.constants;


import com.etl.model.rev.LoginUser;

/**
 * @author chiaxuhong
 * @date 2019-08-14
 */
public class UserSession {
    private static final ThreadLocal<LoginUser> LOCAL_USER = new ThreadLocal<>();

    public static void setUser(LoginUser user) {
        LOCAL_USER.set(user);
    }

    public static void remove() {
        LOCAL_USER.remove();
    }

    public static LoginUser getUser() {
        return LOCAL_USER.get();
    }
}

